Page compression strategy for improved page out process

ABSTRACT

A page compression strategy classifies uncompressed pages selected for compression. Similarly classified pages are compressed and bound into a single logical page. For logical pages having pages with more than one classification, a weighting factor is determined for the logical page.

FIELD OF THE INVENTION

The present invention relates generally to the field of storageaccessing and control and more particularly to memory partitioning.

BACKGROUND OF THE INVENTION

Active memory sharing (AMS) is a memory virtualization technology thatallows multiple partitions to share a pool of physical memory. This isdesigned to increase system memory utilization, thereby enabling you torealize a cost benefit by reducing the amount of physical memoryrequired.

Active memory expansion (AME) is a feature available on commerciallyavailable computer systems. AME allows a partition to expand its memoryup to a given factor. This memory expansion is obtained using in-memorydata compression. AME relies on the real-time compression of data storedin memory to increase the amount of available memory. When AME isenabled, the operating system compresses a portion of the real memory,generating two pools: (i) compressed; and (ii) uncompressed memory. BothAME and AMS are distinct, but compatible, features related to memoryvirtualization.

Steal time is the percentage of time a virtual CPU waits for a real CPUwhile the hypervisor is servicing another virtual processor. CPU time,or CPU usage, can be reported for: (i) each thread; (ii) each process;and/or (iii) the entire system. Moreover, depending on what exactly theCPU was doing, the reported values may be subdivided into distinctcategories, including: (i) user time (the amount of time the CPU wasbusy executing code in user space); (ii) system time (the amount of timethe CPU was busy executing code in kernel space, if this value isreported for a thread or process, then it represents the amount of timethe kernel was doing work on behalf of the executing context, forexample, after a thread issued a system call); (iii) idle time (for thewhole system only) (the amount of time the CPU was not busy, or,otherwise, the amount of time it executed the system idle process, thatis, idle time actually measures unused CPU capacity); and/or (iv) stealtime (for the whole system only) (on virtualized hardware, is the amountof time the operating system wanted to execute, but was not allowed toby the hypervisor).

SUMMARY

In one aspect of the present invention, a method, a computer programproduct, and a system includes: identifying a set of uncompressed pagesin primary memory storage; assigning to each uncompressed page in theset of uncompressed pages a class from a pre-determined set of classes;compressing a plurality of uncompressed pages assigned to a same classinto a single logical page; and storing the single logical page in asecondary memory storage.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is a schematic view of a first embodiment of a system accordingto the present invention;

FIG. 2 is a flowchart showing a method performed, at least in part, bythe first embodiment system;

FIG. 3 is a schematic view of a machine logic (for example, software)portion of the first embodiment system;

FIG. 4 is a schematic view of a second embodiment of a system accordingto the present invention; and

FIG. 5 is a schematic view of a paging device of a system according toan embodiment of the present invention.

DETAILED DESCRIPTION

A page compression strategy classifies uncompressed pages selected forcompression. Similarly classified pages are compressed and bound into asingle logical page. For logical pages having pages with more than oneclassification, a weighting factor is determined for the logical page.The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network, and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers, and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the Figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The present invention will now be described in detail with reference tothe Figures. FIG. 1 is a functional block diagram illustrating variousportions of computer system 100, in accordance with one embodiment ofthe present invention, including: computer 200; communication unit 202;processor set 204; input/output (I/O) interface set 206; memory device208; persistent storage device 210; display device 212; external deviceset 214; random access memory (RAM) devices 230; compressed pages store231; cache memory device 232; uncompressed pages store 233; targetuncompressed pages store 234; and program 300.

System 100 is, in many respects, representative of the various computersub-system(s) in the present invention. Accordingly, several portions ofSystem 102 will now be discussed in the following paragraphs.

System 100 may be a laptop computer, tablet computer, netbook computer,personal computer (PC), a desktop computer, a personal digital assistant(PDA), a smart phone, or any programmable electronic device. Program 300is a collection of machine readable instructions and/or data that isused to create, manage, and control certain software functions that willbe discussed in detail, below.

System 100 is shown as a block diagram with many double arrows. Thesedouble arrows (no separate reference numerals) represent acommunications fabric, which provides communications between variouscomponents of system 100. This communications fabric can be implementedwith any architecture designed for passing data and/or controlinformation between processors (such as microprocessors, communicationsand network processors, etc.), system memory, peripheral devices, andany other hardware components within a system. For example, thecommunications fabric can be implemented, at least in part, with one ormore buses.

Memory 208 and persistent storage 210 are computer readable storagemedia. In general, memory 208 can include any suitable volatile ornon-volatile computer readable storage media. It is further noted that,now and/or in the near future: (i) external device(s) 214 may be able tosupply, some or all, memory for system 100; and/or (ii) devices externalto system 100 may be able to provide memory for system 100.

Program 300 is stored in persistent storage 210 for access and/orexecution by one or more of the respective computer processors 204,usually through one or more memories of memory 208. Persistent storage210: (i) is at least more persistent than a signal in transit; (ii)stores the program (including its soft logic and/or data), on a tangiblemedium (such as magnetic or optical domains); and (iii) is substantiallyless persistent than permanent storage. Alternatively, data storage maybe more persistent and/or permanent than the type of storage provided bypersistent storage 210.

Program 300 may include both machine readable and performableinstructions and/or substantive data (that is, the type of data storedin a database). In this particular embodiment, persistent storage 210includes a magnetic hard disk drive. To name some possible variations,persistent storage 210 may include a solid state hard drive, asemiconductor storage device, read-only memory (ROM), erasableprogrammable read-only memory (EPROM), flash memory, or any othercomputer readable storage media that is capable of storing programinstructions or digital information.

The media used by persistent storage 210 may also be removable. Forexample, a removable hard drive may be used for persistent storage 210.Other examples include optical and magnetic disks, thumb drives, andsmart cards that are inserted into a drive for transfer onto anothercomputer readable storage medium that is also part of persistent storage210.

Communications unit 202, in these examples, provides for communicationswith other data processing systems or devices external to system 100. Inthese examples, communications unit 202 includes one or more networkinterface cards. Communications unit 202 may provide communicationsthrough the use of either or both physical and wireless communicationslinks. Any software modules discussed herein may be downloaded to apersistent storage device (such as persistent storage device 210)through a communications unit (such as communications unit 202).

I/O interface set 206 allows for input and output of data with otherdevices that may be connected locally in data communication withcomputer 200. For example, I/O interface set 206 provides a connectionto external device set 214. External device set 214 will typicallyinclude devices such as a keyboard, keypad, a touch screen, and/or someother suitable input device. External device set 214 can also includeportable computer readable storage media such as, for example, thumbdrives, portable optical or magnetic disks, and memory cards. Softwareand data used to practice embodiments of the present invention, forexample, program 300, can be stored on such portable computer readablestorage media. In these embodiments the relevant software may (or maynot) be loaded, in whole or in part, onto persistent storage device 210via I/O interface set 206. I/O interface set 206 also connects in datacommunication with display device 212.

Display device 212 provides a mechanism to display data to a user andmay be, for example, a computer monitor or a smart phone display screen.

The programs described herein are identified based upon the applicationfor which they are implemented in a specific embodiment of the presentinvention. However, it should be appreciated that any particular programnomenclature herein is used merely for convenience, and thus the presentinvention should not be limited to use solely in any specificapplication identified and/or implied by such nomenclature.

Program 300 operates to classify uncompressed pages prior tocompression. The classified pages are compressed in such a way thatsimilar classes of pages are compressed together into one, or more,logical pages. In that way, during a page-out process, only similarlyclassified, or categorized, pages are paged out.

In AMS, the cumulative logical memory size across all AMS partitions maybe greater than the actual size of physical memory. In the case wherethe cumulative logical memory size across all of such partitions isgreater than the size of physical memory, the hypervisor pages outpartitions' logical memory to the virtual input/output server (VIOS)paging space (an AMS paging device). In this environment, according tosome embodiments of the present invention, the operating systemclassifies memory objects into different classes so that the class of amemory object is known in advance of a page out. In that way, the costassociated with paging out a given set of memory objects is knownaccording to the assigned class. Cost, as used here, reflects, at leastin part, the burden of paging out hot data and/or compressed datacompared to the burden of paging out cold data and/or non-clock data.Because the operating system has a different page out strategy forpaging different characteristics, or classes, it can readily provide ahint to hypervisor for stealing specified pages. Otherwise, thehypervisor may steal OS-critical pages.

For an OS with AME enabled, the hypervisor page-stealing mechanism mightchoose to page out the page that is in either compressed form oruncompressed form. Mostly, this page-stealing activity takes place oncompressed data (because the compressed data is generally least recentlyused).

Some embodiments of the present invention recognize the following facts,potential problems and/or potential areas for improvement with respectto the current state of the art: (i) due to compression, multipleuncompressed pages may fit into single logical page (of pageable size);(ii) a problem arises when multiple uncompressed pages of oppositecharacteristics are compressed and fit into a single logical page; (iii)conventional operating systems don't have a method available to uniquelyidentify the class of a logical page that is a mixture of pagesbelonging to different classes; (iv) conventional operating systemsdon't have a method available to classify a logical page that is amixture of pages belonging to different classes; (v) conventionaloperating systems don't have a page-out strategy for compressed pageswithin a logical page having a mixture of pages belonging to differentclasses; (vi) conventional operating systems are unable to provide anystealing hint to a hypervisor regarding logical pages having mixed amixture of pages belonging to different classes; (vii) conventionally,the hypervisor may simply steal any mixed-class pages, resulting inperformance impact; (viii) active memory sharing (AMS) provides the userwith the ability to oversubscribe memory on a system at the logicalpartition (LPAR) level; (ix) the number of LPARs that could be createdis limited by the amount of physical memory in a machine because an LPARalways had dedicated physical memory; (x) with AMS support, a user cancreate more LPAR's on the system by over-committing physical memory;(xi) the cumulative logical memory size across all AMS partitions can begreater than the size of physical memory; (xii) where the cumulativelogical memory size across all LPARs is greater than the size ofphysical memory, the hypervisor pages out partitions' logical memory tosecondary memory storage; (xiii) AMS support is modeled somewhat aftershared processor support in that each AMS LPAR has its own paging space;(xiv) the time period that hot data spends in paging space is less thanthat time period for cold data; (xv) when active memory expansion (AME)is enabled for an LPAR, the operating system will compress a portion ofthe LPAR's memory and leave the remaining portion of memory uncompressed(this results in memory effectively being broken up into two pools—acompressed pool and an uncompressed pool); (xvi) when the uncompressedpool reaches a maximum threshold, the OS compresses the least recentlyaccessed data and moves it from the uncompressed pool to the compressedpool (this process results in a free page being used to do compressionof an uncompressed page selected for compression).

The following use cases are provided to help the reader understand someconditions where some embodiments of the present invention are helpful.Consider a scenario where Page A (a kernel lock page) and Page B (aworking segment page) are compressed into a single page. Kernel lock(klock) is a mechanism for an operating system to lock the kernel datain memory until the time when no other option is left but to page thekernel data out. Klock pages contain the kernel data in the form of apagable kernel. Page A is critical because it is a klock page. Theoperating system's local paging has a policy to not page out Page A solong as other pages are available to page out. Page B is not as criticalas Page A. In this example, Page A is a working segment page, anon-critical page. When both pages are compressed into one singlelogical page, Page C, the hypervisor does not recognize the two classesof pages within the Page C. Accordingly, it may steal Page C, includingthe klock page, Page A. If the hypervisor steals Page C, it will violatethe OS page-out strategy, which is not to page out critical pages, suchas Page A. Further, by not stealing Page C, the hypervisor also violatesthe OS page-out strategy of actively paging out any non-critical pages,such as Page B. This situation occurs because Page C is a compressedmixture of both critical and non-critical pages.

Consider another scenario where a single logical page, Page D, is to bepaged out and is in a compressed form. Page D contains compressed datawith: (i) the highest access count, Page E; and (ii) the lowest accesscount, Page F. A page having the highest access count indicates thatthere is a regular need for this page. When Page E is paged out, whichwill often be the case, Page F, having data with the lowest accesscount, will also be paged in. This type of mixing of compressed data(combining both hot and cold data) may result in a failure to apply thebest page-out strategy for hypervisor stealing, because the cooperativememory management (CMM) of the OS cannot provide the best stealing hintto the hypervisor.

Consider yet another scenario where a logical page having a mixture ofcompressed pages belonging to different classes is paged-out. In thatcase, there is a possibility of an immediate page-in of the logical pagefor access to hot data. During the page-in process, the cold data(currently not needed) is also paged-into memory along with hot data(currently needed), this operation exerts pressure on the memory pool.For example, Cold Data is mixed with Hot Data in Compressed Page. WhenCompressed Page is paged out when the operating system needs Hot Data,the result is the page-in of Compressed Page. In that way, Cold Data ispaged in unnecessarily when it is not needed in memory. This type ofmixing of compressed data (combining both hot and cold data) may alsoresult in a failure to apply the best page-out strategy for hypervisorstealing.

The above scenarios illustrate what some embodiments of the presentinvention recognize regarding AME and/or OS shortcomings, including: (i)AME and/or OS does not have a mechanism to take it into account theclass of the data when compressing and mixing the data to make a logicalpage of pageable size; (ii) CMM does not uniquely identify a logicalpage of compressed data for containing only data of specifiedcharacteristics; and/or (iii) there is no priority, or weighting,maintained for pages of compressed data having mixed characteristics.

Some embodiments of the present invention function to avoid page out ofdata categorized as: (i) critical data; (ii) hot data along with nocritical data; and/or (iii) cold data. In this example, multiplecompressed pages having the same characteristics are combined into alogical page. In that way, the operating system comfortably hints, orsuggests, to the hypervisor whether or not to steal certain categoriesof pages. If two compressed klock pages are stored on a single logicalpage, the OS is able to hint to the hypervisor not to steal that singlelocal page because of the critical nature of the compressed pagecontent.

Some embodiments of the present invention provide a method to identifythe class, or category, for a logical page composed of multiplecompressed pages of different classes, and to hint to the hypervisorwhether or not to steal a specified logical page based on the identifiedclass.

FIG. 2 shows flowchart 250 depicting a first method according to thepresent invention. FIG. 3 shows program 300 for performing at least someof the method steps of flowchart 250. This method and associatedsoftware will now be discussed, over the course of the followingparagraphs, with extensive reference to FIG. 2 (for the method stepblocks) and FIG. 3 (for the software blocks).

Processing begins at step S255, where uncompressed page module 355identifies a set of target uncompressed pages in a primary memory, suchas RAM. A target uncompressed page is a page having characteristics suchthat it is appropriate to compress the page. Conventional operatingsystem implementations consider the least recently used (LRU) algorithmwhen selecting a target uncompressed page for compression. Someembodiments of the present invention consider one, or more, of thefollowing factors for selecting a “target uncompressed page” forcompression: (i) LRU algorithm; (ii) a set of OS and/or applicationclasses such as: working segment pages, file segment pages, clientpages, and/or klock pages (the OS may classify pages into one, or more,of these classes); (iii) compression algorithm for compressing similarclasses of pages. In this example, the set of target uncompressed pagesis a sub-set of all uncompressed pages in RAM 230. Alternatively, alluncompressed pages in the computer system are “target uncompressedpages.” In such an embodiment, there may not exist both the uncompressedpages store 233 and target uncompressed pages store 234.

Processing proceeds to step S260, where classify module 360 assigns aclass from a set of classes to each target uncompressed page. The targetuncompressed pages are supplied as input to the classify module. Theclassify module classifies the pages into various classes, or groups,that may include one, or more, of the following: (i) working segmentpages; (ii) file segment pages; (iii) client pages; and/or (iv) klockpages. In this example, one class is assigned to each targetuncompressed page. Alternatively, one, or more, classes are assigned toeach target uncompressed page.

Processing proceeds to step S265, where compress module 365 compressestogether the uncompressed pages assigned to a common class. Thecompressed pages are stored either in primary memory or secondarymemory, depending, at least in part, on the capacity of the primarymemory. In this example, compressed pages are shown in memory 208generally, while uncompressed pages are shown in RAM 230. Alternatively,both compressed and uncompressed pages are stored in RAM 230.Alternatively, compressed and/or uncompressed pages are stored in VIOSpaging space. Alternatively, compressed pages are stored in an externaldisk drive. Some embodiments of the present invention distinguishbetween primary memory storage such as RAM, and/or other volatile memorystorage, and secondary memory storage, such as disk storage, and/orother non-volatile memory storage. In this example, compress moduleattempts to compress, into a single logical page, each targetuncompressed page having a same class. In some instances, there may betoo many pages to compress into a single logical page. Also, there maybe instances where there are too few pages necessitate compression. Whenthis occurs, the pages may not be compressed. If mixed pages arecompressed, a weighting scheme, described in further detail below, maybe used.

Processing proceeds to step S270, where compress module 365 determineswhether there are more, or additional, pages to compress by referring totarget uncompressed pages store 234. As stated above, certain pages aretargeted for compression with an objective, at least in part, toincrease the amount of available memory, particularly RAM, or otherprimary memory storage. In this embodiment, a threshold available memorycondition triggers page compression. So long as the threshold is notmet, compress module 365 continues to compress target uncompressedpages. Alternatively, a user initiates page compression and compressmodule 365 continues to compress the pages, identified as “targetuncompressed pages”, until no further page compression is warranted.That is, generally there will be some sub-set of target uncompressedpages that do not necessitate compression due to factors, such as: (i)insufficient number of common-class pages; and/or (ii) insufficientbenefit from compressing the remaining uncompressed pages.Alternatively, the OS periodically performs page compression. In someembodiments, a set of target uncompressed pages is generatedperiodically. Regardless of the basis for page compression, compressmodule 365 applies the appropriate algorithm to determine whether or notto compress additional uncompressed pages.

Processing ends at step S275, where page out module 375 pages out asingle logical page including only one class of compressed pages. As aresult of performing the above-discussed process, there are logicalpages associated with certain classes of pages. Accordingly, page outmodule 375 is able to select which of the classes of logical pages topage out. In this example, the page out module selects a single logicalpage that is classified as working segment pages because those pages areconsidered to be non-critical according to the OS page-out policy.

FIG. 4 is a diagram depicting an embodiment of the present inventionpracticed in an AMS environment. Logical partitions (LPARs) 402, 404,and 406 have a particular physical memory, for example 8 GB. Sharedmemory pool 408 provides for memory requirements, despite theoverbooking of physical memory 410, 412, 414 corresponding to the LPARs.In this example, 24 GB of logical memory is mapped (shown by mappinglines 438 a, 438 b, and 438 c) to 20 GB of physical memory. That is,memory portion 416, of shared memory pool 408, provides for mapping (438a) only 4 GB of physical memory from 8 GB of logical memory 410. It isfurther shown that logical memories 412 and 414, 8 GB each, are mappedto 8 GB each of physical memory 418 and 420, respectively. Alsoillustrated are: OS page table 422; hypervisor page table 424; virtualinput/output server (VIOS) 426; local disks 428, 430, 432; and VIOSdisks 434, 436.

In the illustrated environment, OS page table 422 contains uncompressedpages of the three LPARs 402, 404, and 406. These pages are compressed,as needed in logical memories 410, 412, and 414. Compressed pages aremapped to shared memory pool 408, where pages are stored on local disks428, 430, and 432. As needed, to reduce memory allocation, thehypervisor steals compressed pages to hypervisor page table 424, wherepages are stored over VIOS 426 on VIOS disks 434 and 436.

Some embodiments of the present invention propose to classify alluncompressed pages selected for compression into categories including:(i) critical (klock); (ii) non critical (non klock working segmentpage); (iii) hot page (high access count); and/or (iv) cold page (lessaccess count). The pages from each category are compressed together toensure that pages of the same characteristics (class) are bound in asingle logical page. In this example, logical memories 410, 412, and 414are divided into logical pages containing similarly classified elements.In that way, when a logical page is “stolen” by the hypervisor andrecorded in hypervisor page table 424, only similarly classified pagesare stolen at a given time. This reduces the number of violations of theoperating system's local paging policy. Where binding is not possiblefor some pages, an associated weighting factor, as explained below, isused. The associated weighting factor applies to a logical page composedof compressed data with different characteristics.

FIG. 5 is a diagram illustrating a weighting process according to anembodiment of the present invention. The diagram illustrates a pagingstrategy that allows for mixing of page types, or classes. OS pagingdevice 500 is shown with uncompressed page store 502, and acorresponding compressed page store 504. Compressed page store includesseveral logical pages, four of which are labeled for further discussion,specifically, pages A, B, C, and D. Each logical page A, B, C, and Dincludes one, or more compressed data type. The uncompressed dataincludes including: (i) cold data 506; (ii) non-klock data 508; (iii)klock data 510; and/or (iv) hot data 512.

Weighting is a process applied to single logical pages, such as pages A,B, C, and D, having mixed classes of compressed pages. Depending on theinformation technology (IT) department's policy and/or otherconsiderations, some logical pages may be made up of mixed classes ofdata. The weight factor assigned to a given logical page is used forreference by the OS for hinting to the hypervisor regarding whichlogical page to steal, where a page stealing process is available.According to the illustration, page A is made up of one unit of coldcompressed data and one unit of klock compressed data. The resultingpage weight factor, WF, is illustrated by the following equation:WF=1x+0, where x is the component weight factor for a unit of klockcompressed data. Continuing with the illustration, page B is made up ofone unit of cold compressed data and two units of non-klock workingsegment data. The resulting page weight factor is illustrated by thefollowing equation: WF=2y+0, where y is the component weight factor fora unit of non-klock working segment data. Further, page C is made up ofone unit of cold compressed data and two units of hot compressed data.The resulting page weight factor is illustrated by the followingequation: WF=2z+0, where z is the component weight factor for a unit ofhot compressed data. Finally, page D is made up of one unit of colduncompressed data and two units of klock compressed data. The resultingpage weight factor is illustrated by the following equation: WF=2x+0.

Some embodiments of the present invention may include one, or more, ofthe following features, characteristics and/or advantages: (i) OS willeasily prompt, or guide, the hypervisor on stealable pages and the OSpaging strategy will not be compromised; (ii) hot pages will not bepaged out; (iii) unnecessary page in/page out of pages that are notrequired is considerably reduced (because we are trying to avoid themixture); (iv) with associated weighting for mixed pages, the higherweighted pages are kept in memory to the extent possible; (v) theprimary benefit of active memory sharing (AMS) is the ability tooversubscribe memory on a system at the LPAR level; (vi) compressedpages of the same characteristics are bound into a single logical page(if two compressed klock pages are fitted into a logical page, thisbinding process gives an opportunity for the OS to hint that thehypervisor is not to steal the page); and/or (vii) provide a method toidentify similar classes of pages, and group compressed versions ofpages identified as belonging to similar classes into a single page.

Some helpful definitions follow:

Present invention: should not be taken as an absolute indication thatthe subject matter described by the term “present invention” is coveredby either the claims as they are filed, or by the claims that mayeventually issue after patent prosecution; while the term “presentinvention” is used to help the reader to get a general feel for whichdisclosures herein that are believed as maybe being new, thisunderstanding, as indicated by use of the term “present invention,” istentative and provisional and subject to change over the course ofpatent prosecution as relevant information is developed and as theclaims are potentially amended.

Embodiment: see definition of “present invention” above—similar cautionsapply to the term “embodiment.”

and/or: inclusive or; for example, A, B “and/or” C means that at leastone of A or B or C is true and applicable.

User/subscriber: includes, but is not necessarily limited to, thefollowing: (i) a single individual human; (ii) an artificialintelligence entity with sufficient intelligence to act as a user orsubscriber; and/or (iii) a group of related users or subscribers.

Computer: any device with significant data processing and/or machinereadable instruction reading capabilities including, but not limited to:desktop computers, mainframe computers, laptop computers,field-programmable gate array (fpga) based devices, smart phones,personal digital assistants (PDAs), body-mounted or inserted computers,embedded device style computers, application-specific integrated circuit(ASIC) based devices.

What is claimed is:
 1. A method comprising: identifying a set ofuncompressed pages in a primary memory storage; assigning to eachuncompressed page in the set of uncompressed pages a class from apre-determined set of classes; compressing a plurality of uncompressedpages assigned to a same class and an uncompressed page assigned to adifferent class into a single logical page; determining a page weightfactor for the single logical page; and storing the single logical pagein a secondary memory storage; wherein: the page weight factor is madeup of component weight factors assigned individually to classes of pageswithin the single logical page.
 2. The method of claim 1, furthercomprising: prompting a hypervisor to steal the single logical page,based, at least in part, on the page weight factor.
 3. The method ofclaim 1, wherein the same class is one of the following: working segmentpages, file segment pages, client pages, and/or klock pages.
 4. Acomputer program product comprising a computer readable storage mediumhaving stored thereon: first program instructions programmed to identifya set of uncompressed pages in random access memory (RAM); secondprogram instructions programmed to assign to each uncompressed page inthe set of uncompressed pages a class from a pre-determined set ofclasses; third program instructions programmed to compress into a singlelogical page a plurality of uncompressed pages assigned to a same classand an uncompressed page assigned to a different class; fourth programinstructions programmed to determine a page weight factor for the singlelogical page; and fifth program instructions programmed to store thesingle logical page in memory; wherein: the page weight factor is madeup of component weight factors assigned individually to classes of pageswithin the single logical page.
 5. The computer program product of claim4, further comprising: sixth program instructions programmed to prompt ahypervisor to steal the single logical page, based, at least in part, onthe page weight factor.
 6. The computer program product of claim 4,wherein the same class is one of the following: working segment pages,file segment pages, client pages, and/or klock pages.
 7. A computersystem comprising: a processor set; and a computer readable storagemedium; wherein: the processor set is structured, located, connected,and/or programmed to run program instructions stored on the computerreadable storage medium; and the program instructions include: firstprogram instructions programmed to identify a set of uncompressed pagesin random access memory (RAM); second program instructions programmed toassign to each uncompressed page in the set of uncompressed pages aclass from a pre-determined set of classes; third program instructionsprogrammed to compress into a single logical page a plurality ofuncompressed pages assigned to a same class and an uncompressed pageassigned to a different class; fourth program instructions programmed todetermine a page weight factor for the single logical page; and fifthprogram instructions programmed to store the single logical page inmemory; wherein: the page weight factor is made up of component weightfactors assigned individually to classes of pages within the singlelogical page.
 8. The computer system of claim 7, further comprising:sixth program instructions programmed to prompt a hypervisor to stealthe single logical page, based, at least in part, on the same class ofthe plurality of uncompressed pages.
 9. The computer system of claim 7,wherein the same class is one of the following: working segment pages,file segment pages, client pages, and/or klock pages.